
import numpy as np
import cv2
h1 = cv2.imread('jupyter_notebooks/keenan/home1.png')
h2 = cv2.imread('jupyter_notebooks/keenan/home2.png')

print(h1.ravel()[:500])
[59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37]

print(h2.ravel()[:500])
[59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37 16 59 37]
diff = cv2.subtract(h1, h2)
diff = cv2.addWeighted(h1, 0.3, diff, 1, 0)
cv2.imwrite('jupyter_notebooks/keenan/diff.png', diff)
True


import qancode
qa = qancode.QANCODE(rc_url='https://test.encodedcc.org')
qa.list_methods()
check_downloads check_permissions check_requests check_response_time check_tools check_trackhubs compare_facets find_differences list_methods show_differences
qa.compare_facets(
browsers=['Safari'],
users=['Public'],
item_types=['/search/?type=Experiment'],
browser_comparison=False
)
Opening https://www.encodeproject.org in Safari Getting type: /search/?type=Experiment Search page detected Opening https://test.encodedcc.org in Safari Getting type: /search/?type=Experiment Search page detected ---------------------------------- Experiment ---------------------------------- Comparing data between URLs. As user: Public Browser: Safari First URL: https://www.encodeproject.org Second URL: https://test.encodedcc.org Item type: /search/?type=Experiment Assay MATCH Assay category MATCH Audit category MATCH Audit category2 MATCH Audit category3 MATCH Available data MATCH Biosample treatment MATCH Biosample type MATCH Date Submitted MATCH Date released MATCH Experiment status MATCH Genome assembly (visualization) MATCH Lab MATCH Library depleted in MATCH Library insert size (nt) MATCH Library made from MATCH Library treatment MATCH Life stage MATCH Mapped read length (nt) MATCH Organ MATCH Organism MATCH Platform MATCH Project MATCH RFA MATCH Read length (nt) MATCH Replication type MATCH Run type MATCH Target of assay MATCH
qa.compare_facets_default_actions
['/search/?type=Experiment', '/search/?type=File', '/search/?type=Library', '/search/?type=AntibodyLot', '/search/?type=Biosample', '/search/?type=Donor', 'search/?type=GeneticModification', '/search/?type=FileSet', '/search/?type=Annotation', '/search/?type=Series', '/search/?type=OrganismDevelopmentSeries', '/search/?type=UcscBrowserComposite', '/search/?type=ReferenceEpigenome', '/search/?type=Project', '/search/?type=ReplicationTimingSeries', '/search/?type=PublicationData', '/search/?type=MatchedSet', '/search/?type=TreatmentConcentrationSeries', '/search/?type=TreatmentTimeSeries', '/search/?type=Target', '/search/?type=Pipeline', '/search/?type=Publication', '/search/?type=Software', '/matrix/?type=Experiment', '/matrix/?type=Annotation']
qa.find_differences(
browsers=['Safari'],
users=['Public'],
item_types=['/']
)
Opening https://www.encodeproject.org in Safari
Loading complete
Taking picture of https://www.encodeproject.org/
/var/folders/v8/vsjvg3vn5mz0nrhvkpp7f0_40000gp/T/tmpwtnsuf3t/prod218239331008719121818735299822922991447.png
Opening https://test.encodedcc.org in Safari
Loading complete
Taking picture of https://test.encodedcc.org/
/var/folders/v8/vsjvg3vn5mz0nrhvkpp7f0_40000gp/T/tmpwtnsuf3t/RC16617693017015765867481778073000793216.png
Comparing screenshots between URLs.
As user: Public
Browser: Safari
First URL: https://www.encodeproject.org
Second URL: https://test.encodedcc.org
Item type: /
Click path: None
MATCH
Distance metric: 0
[(False, 'safari_FRONT_PAGE_public_None_prod_rc_diff.png')]
qa = qancode.QANCODE(rc_url='https://nyt.com')
qa.find_differences(
browsers=['Safari'],
users=['Public'],
item_types=['/']
)
Opening https://www.encodeproject.org in Safari Loading complete Taking picture of https://www.encodeproject.org/ /var/folders/v8/vsjvg3vn5mz0nrhvkpp7f0_40000gp/T/tmp4cuvoiyo/prod175449858901618789148939899907510107446.png Opening https://nyt.com in Safari Loading complete Taking picture of https://www.nytimes.com/ /var/folders/v8/vsjvg3vn5mz0nrhvkpp7f0_40000gp/T/tmp4cuvoiyo/RC122276463339994286958944422798482427672.png Comparing screenshots between URLs. As user: Public Browser: Safari First URL: https://www.encodeproject.org Second URL: https://nyt.com Item type: / Click path: None Difference detected Outputting file safari_FRONT_PAGE_public_None_prod_rc_diff.png Distance metric: 302986600
[(True, 'safari_FRONT_PAGE_public_None_prod_rc_diff.png')]
qa.show_differences()
safari_FRONT_PAGE_public_None_prod_rc_diff.png: